<template>
  <div>
    <p>订单编号：{{order.orderno}}</p>
    <p>订单名称：{{order.name}}</p>
    <p>订单金额：{{order.money}}</p>
    <p>商品信息：{{order.gname}}</p>
    <el-button type="danger" @click="pay">立即支付</el-button>
  </div>
</template>
<script>
export default{
  data(){
    return{
      order: JSON.parse(sessionStorage.getItem("order"))
    }
  },
  methods:{
    pay(){
      this.$axios.post("/pay/now", this.order).then(res =>{
        document.write(res.data.data)
      })
    }
  }
}
</script>
<style scoped>

</style>